function List() {

    /**
    * Array of elements over which the List abstraction is created.
    *
    * @private
    * @property elements
    * @type     Array
    * @default  empty Array
    */
    this.elements = new Array();
}


    /**
    * Appends the specified element to the end of this list.
    *
    * @public
    * @method add
    * @param {Object} object element beeing added to the collection
    */
    List.prototype.add = function( object ) {

        this.elements.push( object );
        return object;
    };

    /**
     * Appends all of the elements in the specified collection to the end of this list.
     *
     * @public
     * @method addAll
     * @param {List} collection collection to be added
     */
    List.prototype.addAll = function( collection ) {

        for (var i = 0; i < collection.size(); i++) {
                this.elements.push( collection.get( i ) );
        }
    };

    /**
    * Removes all of the elements from this list leaving it empty.
    *
    * @public
    * @method clear
    */
    List.prototype.clear = function() {

        this.elements = null;
        this.elements = new Array();
    };

    /**
    * Returns true if this list contains the specified element. False otherwise.
    *
    * @public
    * @method contains
    * @param {Object} object object to locate
    * @return {Boolean} true / false
    */
    List.prototype.contains = function( object ) {

        for (var i = 0; i < this.elements.length; i++) {
            if (this.elements[i] == object) {
                return true;
            }
        }
        //
        return false;
    };

    /**
    * Returns the element at the specified position in this collection.
    *
    * @public
    * @method get
    * @param {Number} index index of element to return
    * @return {Object} element stored at specified index or null if can't find any
    */
    List.prototype.get = function( index ) {

        if (index >= 0 && index < this.elements.length) {
            return this.elements[ index ];
        }
        //
        return null;
    };

    /**
    * Returns the index in this list of the first occurrence of the specified element,
    * or -1 if this list does not contain this element.
    *
    * @public
    * @method indexOf
    * @param {Object} object object to find
    * @return {Number} index of requested object. -1 if unable to find one
    */
    List.prototype.indexOf = function( object ) {

        for (var i = 0; i < this.elements.length; i++) {
            if (this.elements[i] === object) {
                return i;
            }
        }
        //
        return -1;
    };

    /**
    * Returns true if this list contains no elements, fase otherwise.
    *
    * @public
    * @method isEmpty
    * @returns {Boolean} true / false
    */
    List.prototype.isEmpty = function() {

        return this.elements.length <= 0;
    };

    /**
     * Removes the element at the specified position in this list (optional operation).
     *
     * @public
     * @method remove
     * @params {Number} index index of element to remove
     */
    List.prototype.remove = function(index) {

        if (index >= 0 && index < this.elements.length) {
            this.elements.splice(index, 1);
        }
    };

    /**
    * Removes specified object from this list
    *
    * @public
    * @method  removeObject
    * @param   {Object} object   element to remove
    */
    List.prototype.removeObject = function(object) {

        this.remove(this.indexOf(object));
        return object;
    }

    /**
     * Replaces the element at the specified position in this list with the specified element.
     *
     * @public
     * @method set
     * @param {Number} index   index of element to replace
     * @param {Object} object  replacement
     */
    List.prototype.set = function(index, object) {

        if (index >= 0 && index < this.elelements.length) {
            this.elements[i] = object;
        }
    };

    /**
     * Returns the number of elements stored in this list.
     *
     * @public
     * @method sie
     * @return {Number} size of collection
     */
    List.prototype.size = function() {

        return this.elements.length;
    };

    /**
     * Return iterator over collection of stored elements.
     *
     * @public
     * @method iterator
     * @return {Iterator} iterator over stored elements
     */
    List.prototype.iterator = function() {

        var args = List.prototype.iterator.arguments;
        if (args.length === 1) {
        // implicit direction set
            return new Iterator( this.elements, args[0] );
        }
        else {
            return new Iterator( this.elements );    
        }
    }

    /**
    * Insert object into the list at specified index
    *
    * @public
    * @method  insert
    * @param   {Number} index
    * @param   {Object} object
    */
    List.prototype.insert = function(index, object) {

        if (index >= 0 && index < this.elements.length) {
            // temp array
            var array = new Array();

            for (var i = 0; i < index - 1; i++) {
                array[i] = this.elements[i];
            }
            array[index] = object;
            for (var i = index; i < this.elements.length; i++) {
                array[i+1] = this.elements[i];
            }
            // rewrite original array with temporary array having new element inserted
            this.elements = array;
        }
    }

    /**
    * Insert all elements of collections starting from specified position
    *
    * @public
    * @method  insertAll
    * @param   {Number} index  start index
    * @param   {List} collection   collection to insert
    */
    List.prototype.insertAll = function(index, collection) {

        if (index >= 0 && index <= this.elements.length && !collection.isEmpty()) {
            // temp array
            var array = new Array();

            for (var i = 0; i < index-1; i++) {
                array[i] = this.elements[i];
            }

            for (var i = 0; i < collection.size(); i++) {
                array[index+i] = collection.get(i);
            }

            for (var i = index; i < this.elements.length; i++) {
                array[i+collection.size()] = this.elements[i];
            }
            
            // rewrite original array with temporary array having new element inserted
            this.elements = array;
        }
    }

    /**
    * Return last element in collection
    *
    * @public
    * @method  last
    * @return  {Object} last element
    */
    List.prototype.last = function() {

        if (!this.isEmpty()) {
            return this.elements[ this.elements.length - 1 ];
        }
        else {
            return null;
        }
    };

    /**
    * Return first element in collection
    *
    * @public
    * @method  first
    * @return  {Object} first element
    */
    List.prototype.first = function() {

        if (!this.isEmpty()) {
            return this.elements[0];
        }
        else {
            return null;
        }
    }


    List.prototype.debug = function() {

        var str = "size: "+this.elements.length+"\n";
        for (var i = 0; i < this.elements.length; i++) {
            str += this.elements[i] + ":";
        }
        //
        alert(str);
    }









